<%@ page import="rentadomus.Person" %>
<!DOCTYPE html>
<html>
  <head>
    <meta name="layout" content="main">
  <g:set var="entityName" value="${message(code: 'person.label', default: 'Person')}" />
  <title>Login - RentADomus</title>
</head>
<body>
  <a href="#create-person" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
  <div class="nav" role="navigation">
    <ul>
      <li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
    </ul>
  </div>
  <div id="create-person" class="content scaffold-create" role="main">
    <h1>Login</h1>
    <g:if test="${flash.message}">
      <div class="message" role="status">${flash.message}</div>
    </g:if>
    <g:hasErrors bean="${personInstance}">
      <ul class="errors" role="alert">
        <g:eachError bean="${personInstance}" var="error">
          <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
        </g:eachError>
      </ul>
    </g:hasErrors>
    <g:form url="[controller:'login', action:'authenticate']">
      <div class="fieldcontain ${hasErrors(bean: personInstance, field: 'username', 'error')} required">
        <label for="username">
          <g:message code="person.username.label" default="Username" />
          <span class="required-indicator">*</span>
        </label>
        <g:textField name="username" maxlength="20" required="" value="${personInstance?.username}"/>
      </div>

      <div class="fieldcontain ${hasErrors(bean: personInstance, field: 'password', 'error')} required">
        <label for="password">
          <g:message code="person.password.label" default="Password" />
          <span class="required-indicator">*</span>
        </label>
        <g:field type="password" name="password" maxlength="20" required="" value="${personInstance?.password}"/>
      </div>
      <fieldset class="buttons" >
        <g:submitButton name="login" class="save" value="Login" />
      </fieldset>
    </g:form>
  </div>
</body>
</html>